<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<ui:composition template="layout/template.xhtml">
	<ui:define name="content">
	
		<h:form id="sysInfoForm" prependId="false">
			<h:outputLabel value="#{resourceBundle['sysInfo.osType']}"/>
			<h:outputText value="#{systemInfoBean.osType}"/>
			<br/>
  			<h:outputLabel value="#{resourceBundle['sysInfo.osVersion']}"/>
			<h:outputText value="#{systemInfoBean.osVersion}"/>
			<br/>
  			<h:outputLabel value="#{resourceBundle['sysInfo.arch']}"/>
			<h:outputText value="#{systemInfoBean.arch}"/>
			<br/>
  			<h:outputLabel value="#{resourceBundle['sysInfo.systemIp']}"/>
			<h:outputText value="#{systemInfoBean.systemIp}"/>
			<br/>
  			<h:outputLabel value="#{resourceBundle['sysInfo.systemName']}"/>
			<h:outputText value="#{systemInfoBean.systemName}"/>
			<br/>
  			<h:outputLabel value="#{resourceBundle['sysInfo.timeZone']}"/>
			<h:outputText value="#{systemInfoBean.timeZone}"/>
			<br/>
			<br/>
			<h:outputLabel value="#{resourceBundle['sysInfo.diskList']}"/>
			<p:dataTable value="#{systemInfoBean.diskList}" var="row">
				<p:column>
					<f:facet name="header">
						<h:outputText value="Mountpoint"/>
					</f:facet>
					<h:outputText value="#{row.mountPoint}"/>
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Total space"/>
					</f:facet>
					<h:outputText value="#{row.totalSpace}"/>
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Used space"/>
					</f:facet>
					<h:outputText value="#{row.usedSpace}"/>
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Free space"/>
					</f:facet>
					<h:outputText value="#{row.freeSpace}"/>
				</p:column>
			</p:dataTable>
			
			<p:commandButton value="showLog" onclick="logDialog.show();" type="button"/> 
			
			<p:dialog header="Logfile" widgetVar="logDialog" modal="false" height="200">
				<p:dataTable value="#{systemInfoBean.JWebminServiceLog}" var="logRow">
					<p:column>
						<h:outputText value="#{logRow}"/>
					</p:column>
				</p:dataTable>
			</p:dialog>

		</h:form>
	</ui:define>
</ui:composition>

</html>